<script setup lang="ts">
import type { VueTypeCom } from '@/types'
import { ref, inject } from 'vue'
import { EditorType, EditorTypeText } from '@/constants'
const props = defineProps<{
  id: string;
  isShow: boolean;
  name: string;
  editCom: VueTypeCom;
  configKey: EditorType;
  status: string;
}>()

const text = ref(props.status);
const updateStatus = inject('updateStatus')

const handleUpdate = (val: string) => {
  updateStatus(props.configKey,val)
}
</script>

<template>
  <div class="desc-editor">
    <div class="desc-editor mb-20">
      {{EditorTypeText[configKey]}}
    </div>
    <el-input type="textarea" :rows="7" v-model="text" placeholder="请输入题目说明（选填）" @update:modelValue="handleUpdate"></el-input>
  </div>
</template>

<style scoped lang="scss">

</style>
